import { request } from '@/utils/request'
import { findByStorageKey } from '@/utils/localStorageUtil'

// 树形查询
export const getCategoryTree = () => {
  const accessToken = findByStorageKey('accessToken')
  return request.get('/category/tree', {
    headers: {
      accessToken
    }
  })
}

//根据三级分类查询对应的一级分类组合
export const getCategoryExtends = (level3CategoryId)=>{
  const accessToken = findByStorageKey('accessToken')
  return request.get(`/category/extends/${level3CategoryId}`, {
    headers: {
      accessToken
    }
})
}
